
using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour
{
	public float movementSpeed;
	public float rotationSpeed;

	private void Update ()
	{
			if(ChainJam.GetButtonPressed(ChainJam.BUTTON.DOWN)) // backward movement
				transform.Translate(Vector3.forward * -movementSpeed * Time.deltaTime);
			if(ChainJam.GetButtonPressed(ChainJam.BUTTON.UP))
				transform.Translate(Vector3.forward * movementSpeed * Time.deltaTime);
			if(ChainJam.GetButtonPressed(ChainJam.BUTTON.LEFT))
				transform.Rotate(transform.up * -rotationSpeed * Time.deltaTime);
			if(ChainJam.GetButtonPressed(ChainJam.BUTTON.RIGHT))
				transform.Rotate(transform.up * rotationSpeed * Time.deltaTime);
	}
}